<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title>StorageStarted</title>
		<meta name="description" content="JavaScript 存储入门 Demo">
		<!-- LeanCloud -->
		<script src="https://unpkg.com/leancloud-storage/dist/av.js"></script>
		<link rel="stylesheet" href="../bootstrap.min.css" />
		<script type="text/javascript" src="../jquery-3.2.1.min.js"></script>
		<script src="../bootstrap.min.js" type="text/javascript" charset="utf-8"></script>

		<!-- handlebars -->
		<script src="https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/4.0.5/handlebars.min.js"></script>

		<!-- Custom styles for this template -->
		<link href="./../header.css" rel="stylesheet">
		<link href="products-list.css" rel="stylesheet">
		<script type="text/javascript" src="./../initLeanCloud.js"></script>
		<script type="text/javascript" src="./../reuseMethods.js"></script>
		<script type="text/javascript" src="products-list.js"></script>
	</head>

	<body>
		<div class="container">
			<div class="header clearfix">
				<nav>
					<ul class="nav pull-right">
						<li role="presentation">
							<a href="#" onclick="logout()">退出登录</a>
						</li>
					</ul>
				</nav>
				<h3 class="text-muted">宝贝出售</h3>
			</div>
			<div>
				<a class="btn btn-primary new-product" href="./../new-product/new-product.html">发布一个新商品</a>
			</div>
			<div class="row products-detail">
				<!-- Products list content -->
				<script id="products-list" type="text/x-handlebars-template">
					{{#each products}}
					<div class="col-sm-6 col-md-4 product-detail">
						<div class="thumbnail">
							<img src={{productImageUrl}}>
							<div class="caption">
								<h3>{{{productTitle}}}</h3>
								<p>{{{productDescription}}}</p>
								<p>来自：{{{ownerUsername}}}</p>
								<p>发布时间：{{{releaseTime}}}</p>
							</div>
						</div>
					</div>
					{{/each}}
				</script>
			</div>
		</div>
		<!-- /container -->

	</body>

</html>